<include file="__THEME__/header" />

<link href="../Public/basic.css" rel="stylesheet" type="text/css" />
<script>
    function changeEnd(_this) {
        if($(_this).is(":checked")){
            $("#endyear").attr("disabled",true);
            $("#endmonth").attr("disabled",true);
        }else{
            $("#endyear").attr("disabled",false);
            $("#endmonth").attr("disabled",false);
        }

    }

    //删除教育信息
    function del_school(id) {
        Confirm({message:'确定删除这条工作信息？',handler:function(tp){
                if(tp=='ok'){
                    $.post(URL+"/delEdu",{id:id,type:'career'},function(txt){
                        if(txt){
                            $("#school_"+id).hide("slow");
                            location.reload();
                        }else{
                            Alert("删除失败!");
                        }
                    });
                }
                if(tp=='cancel'){
                    ymPrompt.close();
                }
                if(tp=='close'){
                    ymPrompt.close();
                }
            }});
    }

function check( ){
  var company = $( '#company' ).val();
  var position = $( '#position' ).val();
  var beginyear = $( '#beginyear' ).val();
  var beginmonth = $( '#beginmonth' ).val();
  var endyear = $( '#endyear' ).val();
  var endmonth = $( '#endmonth' ).val();
  //var endyear = $( '#endmonth' ).val();

  if( !company ){
    Alert( '公司名称没有填写' );
    return false;
  }
  if( !position ) {
    Alert( '职称没有填写' );
    return false;
  }
  if( !beginyear ){
    Alert( '开始年份没有填写' );
    return false;
  }
  if( !beginmonth ){
    Alert( '开始月份没有填写' );
    return false;
  }

  if($( '#nowworkflag' ).attr( 'checked' )==false){
    if( !endyear ) {
      Alert( '结束年份没有填写' );
      return false;
    }
    if( !endmonth ){
      Alert( '结束月份没有填写' );
      return false;
    }
  }
  return true;
}

function checkOld(){

}
</script>

<div class="content"><!-- 内容 begin  -->

    <include file="__THEME__/apps" />


    <div class="main"> <!-- 右侧内容 begin  -->
        <div class=page_title> <!-- page_title begin -->
            <h2><img src="../Public/images/contacts.gif" />修改资料</h2>
        <div class="c"></div>
</div><!-- page_title end -->
        <div class="tab-menu"><!-- 切换标签 begin  -->
            <ul>
                <li><a href="__URL__"><span>基本资料</span></a></li>
                <li><a href="__URL__/intro"><span>个人情况</span></a></li>
                <li><a href="__URL__/contact"><span>联系方式</span></a></li>
                <li><a href="__URL__/education"><span>教育情况</span></a></li>
                <li><a href="__URL__/career" class="on"><span>工作情况</span></a></li>
                <li><a href="__URL__/face"><span>上传头像</span></a></li>
            </ul>
        </div><!-- 切换标签 end  -->


        <div class="data"><!-- 工作情况 begin  -->
			<div class="mt10">
                <h2 class="lh35 f14px btmline"><strong>你的工作情况一览</strong>:</h2>
                <php>if(empty($info)){</php>
            <div class="cGray2 lh30" style="padding:0 0 50px 0">暂无工作信息，立刻添加!</div>
            <php>}else{</php>
				
				<ul>
                    <li class="btmlineD">
                        <DIV class="left cGray2" style="width:200px;">工作单位（部门）</DIV>
                        <DIV class="left cGray2" style="width:150px;">就职时间</DIV>
                        <DIV class="left cGray2" style="PADDING-LEFT: 55px; width:120px;">谁可以看见</DIV>
                        <DIV class="left cGray2" style="width:100px;">在首页显示</DIV>
                        <DIV class="left cGray2"></DIV>
                    </li>
                 <form action="__URL__/doSetEdu" method="post" class="form_validator">
                        <php>for($i=0;$i<count($info);$i++){</php>
                            <li class="btmlineD" id="school_{$vo.id}">
                                <DIV class="left" style="width:200px;">{$info[$i]}  {$class[$i]}</DIV>
                                <DIV class="left" style="width: 150px;">{$year[$i]}</DIV>
                                
                                <DIV class="left" style="PADDING-LEFT: 55px; width:120px;"><span class="left" style="width:100px;">
                                        <select name="__privacy_school[{$id[$i]}]">
                                            <option value="0" <php>if($privacy[$i] == 0){</php> selected="true" <php>}</php>>任何人</option>
                                            <option value="1" <php>if($privacy[$i] == 1){</php> selected="true" <php>}</php>>仅好友</option>
                                            <option value="2" <php>if($privacy[$i] == 2){</php> selected="true" <php>}</php>>私密</option>
                                        </select>
                                        <input type = "hidden" id = "__privacy_old_school[{$id[$i]}]" value={$privacy[$i]}>
                                </span></DIV>
                                <DIV class="left" style="width:100px;">
                                    <input name="__display_school[{$id[$i]}]" type="checkbox" value="1"  <php>if($display[$i] == 1){</php> checked="true" <php>}</php>/>
                                </DIV>
                                <DIV class="left"><a href="javascript:del_school({$id[$i]})">[删除]</a></DIV>
                            </li>
                            
                        <php>}</php>
                          <input type="hidden" name="type" value="career">
                        <li><input type="submit" class="btn_b" value="保存设置" />
                        </li>
                    </form>

                </ul>
				 <php>}</php>
            </div>
           

            <div>
                <h2 class="lh35 f14px btmline"><strong>添加工作情况：</strong></h2>
                <form action="__URL__/doWork" method="post" class="form_validator" onsubmit="return check()">
                    <ul>
                        <li>
                            <DIV class="left alR lh25" style="width:15%;">公司/机构：</DIV>
                            <DIV class="left cGray2" style="width:85%;">
                                <input name="company" type="text" class="TextH20" id="company" style="width:200px;" onBlur="this.className='TextH20'" onFocus="this.className='Text2'" dataType="LimitB" min="1" max="300" msg="公司名称不能为空!" />
                            </DIV>
                            <DIV class="left cGray2"></DIV>
                        </li>
                        <li>
                            <DIV class="left alR lh25" style="width:15%;">部门：</DIV>
                            <DIV class="left" style="width: 85%;">
                                <input name="position" type="text" class="TextH20" id="position" style="width:200px;" onBlur="this.className='TextH20'" onFocus="this.className='Text2'" dataType="LimitB" min="1" max="300" msg="部门名称不能为空!" />
                            </DIV>
                        </li>
                        <li>
                            <DIV class="left alR lh25" style="width:15%">就职时间：</DIV>
                            <div style="width: 85%;" class="zh_i_of left">

                                <div style="margin-top: 5px;">
                                    <select style="width: 4.5em;" name="beginyear" id="beginyear" dataType="Require"  msg="未选择入职年份">
                                        <option value=""> </option>
                                        <option value="2009">2009</option>
                                        <option value="2008">2008</option>
                                        <option value="2007">2007</option>
                                        <option value="2006">2006</option>
                                        <option value="2005">2005</option>
                                        <option value="2004">2004</option>
                                        <option value="2003">2003</option>
                                        <option value="2002">2002</option>
                                        <option value="2001">2001</option>
                                        <option value="2000">2000</option>
                                        <option value="1999">1999</option>
                                        <option value="1998">1998</option>
                                        <option value="1997">1997</option>
                                        <option value="1996">1996</option>
                                        <option value="1995">1995</option>
                                        <option value="1994">1994</option>
                                        <option value="1993">1993</option>
                                        <option value="1992">1992</option>
                                        <option value="1991">1991</option>
                                        <option value="1990">1990</option>
                                        <option value="1989">1989</option>
                                        <option value="1988">1988</option>
                                        <option value="1987">1987</option>
                                        <option value="1986">1986</option>
                                        <option value="1985">1985</option>
                                        <option value="1984">1984</option>
                                        <option value="1983">1983</option>
                                        <option value="1982">1982</option>
                                        <option value="1981">1981</option>
                                        <option value="1980">1980</option>
                                        <option value="1979">1979</option>
                                        <option value="1978">1978</option>
                                        <option value="1977">1977</option>
                                        <option value="1976">1976</option>
                                        <option value="1975">1975</option>
                                        <option value="1974">1974</option>
                                        <option value="1973">1973</option>
                                        <option value="1972">1972</option>
                                        <option value="1971">1971</option>
                                        <option value="1970">1970</option>
                                        <option value="1969">1969</option>
                                        <option value="1968">1968</option>
                                        <option value="1967">1967</option>
                                        <option value="1966">1966</option>
                                        <option value="1965">1965</option>
                                        <option value="1964">1964</option>
                                        <option value="1963">1963</option>
                                        <option value="1962">1962</option>
                                        <option value="1961">1961</option>
                                        <option value="1960">1960</option>
                                        <option value="1959">1959</option>
                                        <option value="1958">1958</option>
                                        <option value="1957">1957</option>
                                        <option value="1956">1956</option>
                                        <option value="1955">1955</option>
                                        <option value="1954">1954</option>
                                        <option value="1953">1953</option>
                                        <option value="1952">1952</option>
                                        <option value="1951">1951</option>
                                        <option value="1950">1950</option>
                                        <option value="1949">1949</option>
                                        <option value="1948">1948</option>
                                        <option value="1947">1947</option>
                                        <option value="1946">1946</option>
                                        <option value="1945">1945</option>
                                        <option value="1944">1944</option>
                                        <option value="1943">1943</option>
                                        <option value="1942">1942</option>
                                        <option value="1941">1941</option>
                                        <option value="1940">1940</option>
                                        <option value="1939">1939</option>
                                        <option value="1938">1938</option>
                                        <option value="1937">1937</option>
                                        <option value="1936">1936</option>
                                        <option value="1935">1935</option>
                                        <option value="1934">1934</option>
                                        <option value="1933">1933</option>
                                        <option value="1932">1932</option>
                                        <option value="1931">1931</option>
                                        <option value="1930">1930</option>

                                    </select> 年 <select style="width: 3.5em;" id="beginmonth" name="beginmonth">
                                        <option value=""> </option>
                                        <option value="01">01</option>
                                        <option value="02">02</option>
                                        <option value="03">03</option>
                                        <option value="04">04</option>
                                        <option value="05">05</option>
                                        <option value="06">06</option>
                                        <option value="07">07</option>
                                        <option value="08">08</option>
                                        <option value="09">09</option>
                                        <option value="10">10</option>
                                        <option value="11">11</option>
                                        <option value="12">12</option>
                                    </select> 月至
                                    <select style="width: 4.5em;" id="endyear" name="endyear">
                                        <option value=""> </option>
                                        <option value="2009">2009</option>
                                        <option value="2008">2008</option>
                                        <option value="2007">2007</option>
                                        <option value="2006">2006</option>
                                        <option value="2005">2005</option>
                                        <option value="2004">2004</option>
                                        <option value="2003">2003</option>
                                        <option value="2002">2002</option>
                                        <option value="2001">2001</option>
                                        <option value="2000">2000</option>
                                        <option value="1999">1999</option>
                                        <option value="1998">1998</option>
                                        <option value="1997">1997</option>
                                        <option value="1996">1996</option>
                                        <option value="1995">1995</option>
                                        <option value="1994">1994</option>
                                        <option value="1993">1993</option>
                                        <option value="1992">1992</option>
                                        <option value="1991">1991</option>
                                        <option value="1990">1990</option>
                                        <option value="1989">1989</option>
                                        <option value="1988">1988</option>
                                        <option value="1987">1987</option>
                                        <option value="1986">1986</option>
                                        <option value="1985">1985</option>
                                        <option value="1984">1984</option>
                                        <option value="1983">1983</option>
                                        <option value="1982">1982</option>
                                        <option value="1981">1981</option>
                                        <option value="1980">1980</option>
                                        <option value="1979">1979</option>
                                        <option value="1978">1978</option>
                                        <option value="1977">1977</option>
                                        <option value="1976">1976</option>
                                        <option value="1975">1975</option>
                                        <option value="1974">1974</option>
                                        <option value="1973">1973</option>
                                        <option value="1972">1972</option>
                                        <option value="1971">1971</option>
                                        <option value="1970">1970</option>
                                        <option value="1969">1969</option>
                                        <option value="1968">1968</option>
                                        <option value="1967">1967</option>
                                        <option value="1966">1966</option>
                                        <option value="1965">1965</option>
                                        <option value="1964">1964</option>
                                        <option value="1963">1963</option>
                                        <option value="1962">1962</option>
                                        <option value="1961">1961</option>
                                        <option value="1960">1960</option>
                                        <option value="1959">1959</option>
                                        <option value="1958">1958</option>
                                        <option value="1957">1957</option>
                                        <option value="1956">1956</option>
                                        <option value="1955">1955</option>
                                        <option value="1954">1954</option>
                                        <option value="1953">1953</option>
                                        <option value="1952">1952</option>
                                        <option value="1951">1951</option>
                                        <option value="1950">1950</option>
                                        <option value="1949">1949</option>
                                        <option value="1948">1948</option>
                                        <option value="1947">1947</option>
                                        <option value="1946">1946</option>
                                        <option value="1945">1945</option>
                                        <option value="1944">1944</option>
                                        <option value="1943">1943</option>
                                        <option value="1942">1942</option>
                                        <option value="1941">1941</option>
                                        <option value="1940">1940</option>
                                        <option value="1939">1939</option>
                                        <option value="1938">1938</option>
                                        <option value="1937">1937</option>
                                        <option value="1936">1936</option>
                                        <option value="1935">1935</option>
                                        <option value="1934">1934</option>
                                        <option value="1933">1933</option>
                                        <option value="1932">1932</option>
                                        <option value="1931">1931</option>
                                        <option value="1930">1930</option>

                                    </select> <span id="endyearword">年</span> <select style="width: 3.5em;" id="endmonth" name="endmonth">
                                        <option value=""> </option>
                                        <option value="01">01</option>
                                        <option value="02">02</option>
                                        <option value="03">03</option>
                                        <option value="04">04</option>
                                        <option value="05">05</option>
                                        <option value="06">06</option>
                                        <option value="07">07</option>
                                        <option value="08">08</option>
                                        <option value="09">09</option>
                                        <option value="10">10</option>
                                        <option value="11">11</option>
                                        <option value="12">12</option>
                                    </select> <span id="endmonthword">月</span> <span> (<input type="checkbox" onclick="changeEnd(this)" value="1" name="nowworkflag" id='nowworkflag'/>至今)</span>


                                </div>
                            </div>


                        </li>
                        <li>
                            <DIV class="left alR" style="width:15%;">&nbsp;</DIV>
                            <input type="hidden" name="type" value="career">
                            <DIV class="left" style="width: 85%;"><input type="submit" class="btn_b" value="添 加" />
                            </DIV>
                        </li>
                    </ul>
                </form>
            </div>
        </div><!-- 工作情况 end  -->




    </div><!-- 右侧内容 end  -->
<div class="c"></div>
</div><!-- 内容 end -->
<include file="__THEME__/footer" />
